/*
 * Copyright 2012-2014 the original author or authors.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.jqd.framework.core.hessian.biz.action.support;

import com.jqd.framework.core.hessian.biz.action.ActionHandlerInterceptor;

/**
 * 
 * TODO
 * 
 * @author liaozhicheng.cn@gmail.com
 * @date 2012-6-11
 * @since 1.0
 * @see com.jqd.framework.core.hessian.biz.action.ActionHandlerInterceptor
 */
public class ActionHandlerExecution {
	
	// 具体处理controller请求的Action实例
	private Object handler;
	
	// 拦截器数组，可以在调用具体action方法前后加入一些额外逻辑
	// 如可以加入一个实现该接口ActionHandlerInterceptor的类来监视调用action方法的执行时间
	private ActionHandlerInterceptor[] interceptors;
	
	
	public ActionHandlerExecution() {
	}
	
	
	public ActionHandlerExecution(Object handler, ActionHandlerInterceptor[] interceptors) {
		this.handler = handler;
		this.interceptors = interceptors;
	}
	
	
	/**
	 * @return the handler
	 */
	public Object getHandler() {
		return handler;
	}
	
	
	/**
	 * @param handler
	 *            the handler to set
	 */
	public void setHandler(Object handler) {
		this.handler = handler;
	}
	
	
	/**
	 * @return the interceptors
	 */
	public ActionHandlerInterceptor[] getInterceptors() {
		return interceptors;
	}
	
	
	/**
	 * @param interceptors
	 *            the interceptors to set
	 */
	public void setInterceptors(ActionHandlerInterceptor[] interceptors) {
		this.interceptors = interceptors;
	}
	
}
